package com.rocky.component.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rocky.component.elasticsearch.annotation.RockyESDate;
import com.rocky.component.elasticsearch.annotation.RockyESModel;
import com.rocky.component.util.serializer.DateSerializer;
import com.rocky.component.util.serializer.DatetimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author rocky
 * date 2025-08-02
 * Description:
 */
@Data
@RockyESModel(indexName = "store_temp")
@EqualsAndHashCode(callSuper = true)
public class GeoStoreEntity extends BaseGeoEntity {

    /**
     * 名称
     */
    private String name;

    /**
     * 地址
     */
    private String address;

    /**
     * 省
     */
    private String province;

    /**
     * 市
     */
    private String city;

    /**
     * 区
     */
    private String county;

    @RockyESDate(format = "yyyy-MM-dd")
    @JsonSerialize(using = DateSerializer.class)
    private LocalDate createDate;

    @RockyESDate(format = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = DatetimeSerializer.class)
    private LocalDateTime updateTime;

}
